﻿using demo.Event;
using Prism.Commands;
using Prism.Events;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace demo
{
    public class MainWindowViewModel : BindableBase
    {
        public MainWindowViewModel()
        {
           
            BtnOkCommand = new DelegateCommand(Send);
        }


        public void Send()
        {
            //_aggregator.GetEvent<MessageEvent>().Publish("Hello World!");
            EventBus.Instance.GetEvent<MessageEvent>().Publish(DateTime.Now.ToString());
        }

        public DelegateCommand BtnOkCommand { get; set; }

    }
}
